home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)tf.d64
/
terminal.c1 v2.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
2KB
|
66 lines
10 REM *** NEW PROTOCOL ***
20 REM RELEASE 2: OCT 27 1984
30 REM BY STEVE PUNTER
40 IFPEEK(49152)<>169THENLOAD"TERM.C1 V2",8,1
50 OPEN5,2,0,CHR$(8):GET#5,A$:BS=255:OPEN1,8,15:DIMT$(3):SYS49176
60 TY$="PSP":T$(1)="[208]ROGRAM":T$(2)="[211][197][209]":T$(3)="[215]ORD[208]RO":CS=1.02273E6
70 BR$="300":GOSUB6000
80 PRINT"[147][207]PTION: ("+BR$+" [194]AUD) [194]LOCK [211]IZE ="BS""
90 PRINT" 1 - [212]ERMINAL [205]ODE"
100 PRINT" 2 - [212]RANSMIT A [198]ILE"
110 PRINT" 3 - [210]ECEIVE A [198]ILE"
120 PRINT" 4 - [195]HANGE [194]LOCK [211]IZE"
130 PRINT" 5 - [212]OGGLE [194]AUD [210]ATE (300-1200)"
140 GETA$:IFA$=""THEN140
150 IFA$="2"THEN1000
160 IFA$="3"THEN2000
170 IFA$="4"THEN3000
180 IFA$="1"THENPRINT"[212]ERMINAL [205]ODE:":GOTO4000
190 IFA$="5"THEN6700
200 GOTO140
1000 PRINT"[208]ROGRAM [206]AME? ";:GOSUB5000:IFI$=""ORFL=1THEN80
1010 PRINT"[198]ILE [212]YPE ([208], [211], OR [215])? [146][157]";
1020 GETA$:IFA$=""THEN1020
1030 IFA$="[133]"THEN80
1040 IFA$="P"THENSA=0:T=1:GOTO1080
1050 IFA$="S"THENSA=2:T=2:GOTO1080
1060 IFA$="W"THENSA=0:T=3:GOTO1080
1070 GOTO1020
1080 PRINTT$(T)"":OPEN2,8,SA,I$:INPUT#1,E$,EM$,T$,S$
1090 IFVAL(E$)>0THENPRINT""E$","EM$","T$","S$:CLOSE2:GOTO1010
1120 SYS49173:POKE51227,T:SYS49164:IFPEEK(512)=1THENCLOSE2:GOTO4000
1130 SYS49173:POKE51224,BS:SYS49158:CLOSE2:GOTO4000
2000 PRINT"[211]AVE [193]S? ";:GOSUB5000:IFI$=""ORFL=1THEN80
2010 SYS49173:SYS49161:IFPEEK(512)=1THEN4000
2020 T$=","+MID$(TY$,PEEK(51227),1)+",W"
2025 PRINT"[198]ILE [212]YPE: "T$(PEEK(51227))
2030 OPEN2,8,2,"@0:"+I$+T$:FORX=1TO1300:NEXTX:PRINT:SYS61310
2040 SYS49173:SYS49155:CLOSE2:FORX=1TO1500:NEXTX:POKE668,PEEK(667):GOTO4000
3000 PRINT"[194]LOCK [211]IZE? ";:GOSUB5000:IFI$=""THEN80
3010 BS=VAL(I$):IFBS<40THENBS=40
3020 IFBS>255THENBS=255
3030 GOTO80
4000 PRINT
4010 SYS49173:SYS49167:GOTO80
5000 I$="":FL=0
5010 PRINT" [146][157]";
5020 GETA$:IFA$=""THEN5020
5030 IFA$=CHR$(13)THEN5100
5040 IFA$=CHR$(20)THEN5080
5045 IFA$="[133]"THENFL=1:GOTO5100
5050 IFLEN(A$)>20THEN5020
5060 IF(ASC(A$)AND127)<32THEN5020
5070 PRINTA$;:I$=I$+A$:GOTO5010
5080 IFLEN(I$)=0THEN5020
5090 PRINT" [157][157]";:I$=LEFT$(I$,LEN(I$)-1):GOTO5010
5100 PRINT" ":RETURN
6000 S=VAL(BR$):POKE659,6:IFS=1200THENPOKE659,8
6010 RC=CS/S:GOSUB6500:POKE51968,LO:POKE51969,HI
6020 IFS=1200THENRC=CS/S*.966:GOSUB6500
6030 POKE665,LO:POKE666,HI
6040 RC=CS/S/2-100:GOSUB6500:POKE661,LO:POKE662,HI:RETURN
6500 HI=INT(RC/256):LO=INT(RC-HI*256):RETURN
6700 IFBR$="300"THENBR$="1200":GOTO6720
6710 BR$="300"
6720 GOSUB6000:GOTO80